package com.ecsolutions.controller.liability;

import com.ecsolutions.entity.liability.LiabilityEntity;
import com.ecsolutions.service.liability.LiabilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by Administrator on 2017/5/15.
 */
@RestController
@RequestMapping("/liability")
public class LiabilityController {
    @Autowired
    private LiabilityService liabilityService;

    public LiabilityService getLiabilityService() {
        return liabilityService;
    }

    @CrossOrigin(origins = "*")
    @GetMapping("/getLiabilityList/{customer_code}")
    public List<LiabilityEntity> getLiabilityList(@PathVariable("customer_code") String customer_code) {
        List<LiabilityEntity> ret = null;
        ret = this.liabilityService.getLiabilityList(customer_code);
        return ret;
    }
}
